package com.itfenghuang.day15_作业;

import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.net.Socket;

public class A04_客户端 {
    public static void main(String[] args) throws IOException {
        FileInputStream fs = new FileInputStream("F:\\bbb\\a.txt");
        Socket sk = new Socket("127.0.0.1",12344);
        OutputStream os = sk.getOutputStream();
        InputStream is = sk.getInputStream();
        byte[] bs = new byte[1024];
        int len;
        while ((len=is.read(bs))!=-1){
            System.out.println(new String(bs,0,len));
        }
    }
}
